package main

import (
	"gitee.com/enjoy_5/spikes-rpc/internal/api"
	"gitee.com/enjoy_5/spikes-rpc/internal/model"
	"gitee.com/xuxinzhi2206/corehub/viper"
)

func main() {
	err := viper.GetViper("./config.yaml")
	if err != nil {
		panic(err)
	}
	//自动迁移
	err = model.AutoMigrate()
	if err != nil {
		panic(err)
	}
	//启动一个grpc
	err = api.SpikesRegisterGRPC()
	if err != nil {
		panic(err)
	}
}
